<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:77:"D:\phpstudy_pro\WWW\nmg002\public/../application/admin\view\videos\lists.html";i:1657873827;}*/ ?>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> <?php echo $setting['webname']; ?>- 视频管理</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="/public/static/favicon.ico">
    <link rel="stylesheet" href="/public/static/admin/layui/css/layui.css">
    <link href="/public/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/public/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/public/static/admin/css/animate.css" rel="stylesheet">
    <link href="/public/static/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="/public/static/admin/css/plugins/switchery/switchery.css" rel="stylesheet">

    <script src="/public/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/static/admin/layui/layui.js"></script>
</head>

<body class="gray-bg">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-sm-4">
            <h2>视频管理</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="<?php echo url('Admins/admin'); ?>">主页</a>
                </li>
                <li>
                    <strong>视频列表</strong>
                </li>
            </ol>
        </div>
        <div class="col-sm-8" style="text-align: right;line-height: 15px;margin-top:25px;">

        </div>
    </div>
    <div class="wrapper wrapper-content animated fadeIn">
        <div class="row">
            <div class="col-sm-12">
                <div class="tabs-container">
                    <div class="tabs-left">
                        <ul class="nav nav-tabs" id="table-title">
                            <?php foreach($list as $v): ?>
                                <li id="type<?php echo $v['id']; ?>" data-id="<?php echo $v['id']; ?>"><a data-toggle="tab" href="#tab-<?php echo $v['id']; ?>"  aria-expanded="true"> <?php echo $v['name']; ?></a></li>
                            <?php endforeach; ?>
                        </ul>
                        <div class="tab-content">
                            <?php foreach($list as $v): ?>
                            <!--新闻列表开始-->
                            <div id="tab-<?php echo $v['id']; ?>" class="tab-pane">
                                <div class="panel-body">
                                    <div class="col-sm-9 animated fadeInRight">
                                        <div class="row">
                                            <div class="col-sm-12">
                                                <!--行开始-->
                                                <?php if(!empty($v['newslist'])): foreach($v['newslist'] as $vs): ?>
                                                        <div class="file-box" style="width: 300px;">
                                                            <div class="file">
                                                                <a href="<?php echo url('Videos/update'); ?>?id=<?php echo $vs['id']; ?>">
                                                                    <span class="corner"></span>
                                                                    <?php if(!empty($vs['bigimg'])): ?>
                                                                        <div class="image">
                                                                            <img alt="image" class="img-responsive" src="<?php echo $vs['bigimg']; ?>">
                                                                        </div>
                                                                    <?php else: ?>
                                                                        <div class="icon">
                                                                            <i class="img-responsive fa fa-film"></i>
                                                                        </div>
                                                                    <?php endif; ?>
                                                                    <div class="file-name">
                                                                       <?php echo $vs['title']; ?> <a class="del" data-id="<?php echo $vs['id']; ?>"><i class="glyphicon glyphicon-trash" style="color:#19a9d5"></i></a>
                                                                        <br/>
                                                                        <small>添加时间：<?php echo $vs['create_time']; ?></small>
                                                                    </div>
                                                                </a>
                                                            </div>
                                                        </div>
                                                    <?php endforeach; else: ?>
                                                   暂无数据
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <!--行开始-->
                                        <?php if($v['page']['total'] >0): ?>
                                        <!--开始结束-->
                                        <div id="pagination<?php echo $v['id']; ?>">

                                        </div>
                                        <?php endif; ?>
                                        <script>
                                            layui.use('laypage', function () {
                                                var laypage = layui.laypage;
                                                laypage.render({
                                                    elem: 'pagination<?php echo $v['id']; ?>'
                                                    , count: '<?php echo $v['page']['total']; ?>'//总条数
                                                    , limit: 10  //每页显示数量
                                                    , curr: '<?php echo $v['page']['current_page']; ?>'  //当前页
                                                    , skip: true
                                                    , theme: '#337ab7'
                                                    , jump: function (obj, first) {
                                                        // 首次不执行
                                                        if (!first) {
                                                            location.href= '<?php echo url("Videos/lists"); ?>?typeid=<?php echo $v['id']; ?>&page='+obj.curr;
                                                        }
                                                    }
                                                });
                                            });
                                        </script>
                                    </div>
                                </div>
                            </div>
                            <!-- 新闻列表结束 -->
                            <?php endforeach; ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 全局js -->
    <script src="/public/static/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- iCheck -->
    <script src="/public/static/admin/js/plugins/iCheck/icheck.min.js"></script>
    <!-- Switchery -->
    <script src="/public/static/admin/js/plugins/switchery/switchery.js"></script>
    <!-- 自定义js -->
    <script src="/public/static/admin/js/content.js?v=1.0.0"></script>
    <script>
        $("#type<?php echo $activeid; ?>").attr("class","active");
        $("#tab-<?php echo $activeid; ?>").attr("class","tab-pane active");
        layui.use('layer', function(){ //独立版的layer无需执行这一句
            var $ = layui.jquery, layer = layui.layer, laypage = layui.laypage; //独立版的layer无需执行这一句
            //执行一个laypage实例
            //点击提交
            $(".del").click(function(){
                var s = $(this);
                top.layer.msg('你确定要删除？', {
                    time: 20000, //20s后自动关闭
                    shade: 0.8,
                    btn: ['确定', '取消'],
                    btn1:function(){
                        $.post("<?php echo url('Videos/deletes'); ?>",{id:s.attr('data-id'),typeid:s.attr('data-typeid')},function(data){
                            top.layer.closeAll();
                            top.layer.msg(data.msg,{time:2000,shade:0.5},function(){
                                if(data.url){
                                    window.location.href = data.url;
                                }
                            });
                        });
                    }
                });
            });
        });
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });

    </script>

    
    

</body>

</html>
